/*
 Navicat Premium Data Transfer

 Source Server         : capability
 Source Server Type    : MySQL
 Source Server Version : 50635
 Source Host           : localhost
 Source Database       : ability

 Target Server Type    : MySQL
 Target Server Version : 50635
 File Encoding         : utf-8

 Date: 02/08/2018 08:56:42 AM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `ability`
-- ----------------------------
DROP TABLE IF EXISTS `ability`;
CREATE TABLE `ability` (
  `id` bigint(16) NOT NULL,
  `name` varchar(64) COLLATE utf8_bin NOT NULL,
  `serviceName` varchar(256) COLLATE utf8_bin NOT NULL,
  `serviceType` tinyint(1) NOT NULL,
  `method` varchar(5) COLLATE utf8_bin NOT NULL,
  `timeout` int(11) NOT NULL,
  `rateLimit` int(8) NOT NULL,
  `perRateLimit` int(11) DEFAULT NULL,
  `maxTimeoutTimes` int(11) DEFAULT NULL,
  `perMaxTimeoutTimes` int(11) DEFAULT NULL,
  `state` tinyint(1) DEFAULT NULL,
  `isPrivate` tinyint(4) DEFAULT NULL,
  `description` varchar(256) COLLATE utf8_bin DEFAULT NULL,
  `updateDate` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ability_index_name` (`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `ability`
-- ----------------------------
BEGIN;
INSERT INTO `ability` VALUES ('1517137682471', 'group-new', 'crm-grouporder-service', '0', 'GET', '16000', '-1', '-1', '-1', '-1', '1', '0', '融合新装业务订单接口', '2018-02-08 00:06:47'), ('1517137969732', 'group-change', '啊', '0', 'POST', '16000', '-1', '-1', '-1', '-1', '0', '1', '融合变更接口', '2018-02-08 00:07:33'), ('1517412056632', 'test-url', 'http://127.0.0.1:19901/apiv1', '1', 'POST', '9000', '-1', '-1', '-1', '-1', '0', '0', '测试', '2018-02-08 00:07:53');
COMMIT;

-- ----------------------------
--  Table structure for `instance`
-- ----------------------------
DROP TABLE IF EXISTS `instance`;
CREATE TABLE `instance` (
  `id` bigint(20) NOT NULL,
  `serviceId` bigint(20) NOT NULL,
  `machineId` bigint(20) NOT NULL,
  `port` int(11) NOT NULL,
  `jarPath` varchar(512) NOT NULL,
  `state` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `instance`
-- ----------------------------
BEGIN;
INSERT INTO `instance` VALUES ('2169090102867787776', '2169059957637382150', '2169087379497811968', '2', '2', '0'), ('2170477135628599300', '2169017079007543296', '2170476580269195265', '19801', '31313', '2'), ('2170546039256252416', '2169017079007543296', '2170476580269195265', '19802', '22242', '0'), ('2172864587219599360', '2169017079007543296', '2170476580269195265', '9832', '223424', '0');
COMMIT;

-- ----------------------------
--  Table structure for `machine`
-- ----------------------------
DROP TABLE IF EXISTS `machine`;
CREATE TABLE `machine` (
  `id` bigint(19) NOT NULL,
  `name` varchar(64) COLLATE utf8_bin NOT NULL,
  `ipAddress` varchar(64) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `machine`
-- ----------------------------
BEGIN;
INSERT INTO `machine` VALUES ('2170476580269195265', '机器1', '127.0.0.1:19801'), ('2170536134721929216', '机器5', '127.0.0.1:19801'), ('2170537058865512449', '111', '127.0.0.1:19801');
COMMIT;

-- ----------------------------
--  Table structure for `microservice`
-- ----------------------------
DROP TABLE IF EXISTS `microservice`;
CREATE TABLE `microservice` (
  `id` bigint(20) NOT NULL,
  `serviceName` varchar(64) NOT NULL,
  `description` varchar(128) DEFAULT NULL,
  `state` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `microservice`
-- ----------------------------
BEGIN;
INSERT INTO `microservice` VALUES ('2169017079007543296', 'test-service', 'test', '0'), ('2169058033122934784', 'test', 'test', '0'), ('2169059957637382150', 'crm-grouporder-service', '融合业务微服务', '1');
COMMIT;

-- ----------------------------
--  Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` bigint(19) NOT NULL,
  `clientId` varchar(16) COLLATE utf8_bin NOT NULL,
  `secretKey` varchar(32) COLLATE utf8_bin NOT NULL,
  `token` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `tokenExpireTime` timestamp NULL DEFAULT NULL,
  `state` int(11) NOT NULL,
  `userType` tinyint(4) DEFAULT NULL,
  `name` varchar(64) COLLATE utf8_bin DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_user_clientid` (`clientId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user`
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('0', '6XPCZAMF1TUFBT7T', 'TARJAL5FM67EIGFE29T4PRJBEZLB8Z6J', null, null, '1', '1', '联通用户ab');
COMMIT;

-- ----------------------------
--  Table structure for `userability`
-- ----------------------------
DROP TABLE IF EXISTS `userability`;
CREATE TABLE `userability` (
  `id` bigint(20) NOT NULL,
  `abilityId` bigint(20) NOT NULL,
  `abilityName` varchar(64) NOT NULL,
  `clientId` varchar(16) NOT NULL,
  `rateLimit` int(11) NOT NULL,
  `timeout` int(11) NOT NULL,
  `maxTimeoutTimes` int(11) NOT NULL,
  `state` tinyint(4) NOT NULL,
  `updateTime` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `userability`
-- ----------------------------
BEGIN;
INSERT INTO `userability` VALUES ('2170139499919572993', '1517137969732', 'node', '6XPCZAMF1TUFBT7T', '-1', '9000', '111', '0', '2018-01-31 23:18:43'), ('2170163029633662979', '1517137682471', 'group.new', '6XPCZAMF1TUFBT7T', '-1', '9000', '66', '1', '2018-01-31 23:16:59');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
